20 int mat
[105][105*105];
22 int func(int a
, int b
, bool c
){
26 int thisTravel
= viajes
[a
]/(c
?2:1);
30 mat
[a
][b
] = (thisTravel
+= min(func(a
+1,b
-1,1),func(a
+1,b
,0)));
32 mat
[a
][b
] = (thisTravel
+= func(a
+1,b
,0));
44 scanf("%d",&viajes
[z
]);
45 scanf("%d",&bolas
[z
]);
48 for(int y
=0;y
<n
*n
;++y
)
50 printf("%d\n",func(0,0,0));